-- GENERATED SPELL FOR [Shadowforge Ambusher] --


function spell0_7091(pUnit, Event) --@Defensive Stance,Self--
pUnit:FullCastSpellOnTarget(7164,pUnit)
pUnit:RegisterEvent('Sorts_7091', 603, 1)
end

function spell1_7091(pUnit, Event) --@Disarm,n/a--
pUnit:FullCastSpellOnTarget(6713,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_7091', 5263, 1)
end

function spell2_7091(pUnit, Event) --@Shield Bash,n/a--
pUnit:FullCastSpellOnTarget(11972,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_7091', 8277, 1)
end

function Sorts_7091(pUnit, Event)
local choix_sorts_7091 = math.random(0, 2)
if choix_sorts_7091 == 0 then
pUnit:RegisterEvent('spell0_7091', 1, 1)
end
if choix_sorts_7091 == 1 then
pUnit:RegisterEvent('spell1_7091', 1, 1)
end
if choix_sorts_7091 == 2 then
pUnit:RegisterEvent('spell2_7091', 1, 1)
end
end

function mob7091_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_7091', math.random(1500, 3000), 1)
end

function mob7091_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob7091_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob7091_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(7091, 1, 'mob7091_Action')
RegisterUnitEvent(7091, 2, 'mob7091_Leave')
RegisterUnitEvent(7091, 3, 'mob7091_Kill')
RegisterUnitEvent(7091, 4, 'mob7091_Die')
